package com.atde._04_structural_design_patterns.facade;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._04_structural_design_patterns.facade
 * @Author: Del
 * @CreateTime: 2025-06-23  09:21
 * @Description: 外观模式  --- 屏幕
 * @Version: 1.0
 */
public class Screen {
    private Screen() {}

    private static volatile Screen instance;

    public static Screen getInstance() {
        if (instance == null) {
            synchronized (Screen.class) {
                if (instance == null) {
                    instance = new Screen();
                }
            }
        }
        return instance;
    }

    public void up() {
        System.out.println("屏幕上升......");
    }

    public void down() {
        System.out.println("屏幕下降......");
    }
}
